function dickson_charge_flow
% This function uses node equations and kcl to find the charge vector of a 4-to-1 2-phase dickson converter.

clc;
A1=[0 1 0 1 -1; 1 0 1 0 1; -1 -1 0 0 0];
A2=[0 0 1 -1 -1; 0 1 0 1 1; 1 0 0 0 0];

NullA1_0=null(A1)
NullA1=NullA1_0(2:end-1,1:end)
NullA2_0=null(A2)
NullA2=NullA2_0(2:end-1,1:end)
B=null([NullA1 NullA2])
q1=NullA1_0*B(1:2)
q2=NullA2_0*B(3:end)
